from flask import Flask, render_template, url_for, redirect
from gevent import pywsgi
from flask_cors import *

app = Flask(__name__, template_folder='templates')


@app.route('/index', methods=['GET', 'POST'])
def index():
    return render_template('index.html')


@app.route('/', methods=['GET', 'POST'])
def root():
    return redirect(url_for('index'))


@app.route('/login', methods=['GET', 'POST'])
def login():
    return render_template('result.html', msg='12sadasdASDasdsdadadadasdadasdasd3\nadasdasd')


if __name__ == '__main__':
    server = pywsgi.WSGIServer(('0.0.0.0', 5590), app)
    # print('server start!')
    server.serve_forever()
    # app.run(host='0.0.0.0', port=5591)
